package bean;

import java.io.Serializable;
import java.sql.Time;
import java.time.LocalDate;
import java.util.Objects;

/**
 * @Auther leiHua
 * @Date 2022/5/8
 * 比赛项目信息类
 */
public class Competition implements Serializable {
    private static final long serialVersionUID=1L;
    private String c_id;  //比赛项目Id
    private String competitionName;//  项目名称
    private String palce; //比赛地点
    private int number;  //比赛人数
    private String time ; //比赛时间

    public Competition() {
    }

    public Competition(String c_id, String competitionName, String palce, int number, String time) {
        this.c_id = c_id;
        this.competitionName = competitionName;
        this.palce = palce;
        this.number = number;
        this.time = time;
    }

    public String getC_id() {
        return c_id;
    }

    public void setC_id(String c_id) {
        this.c_id = c_id;
    }

    public String getCompetitionName() {
        return competitionName;
    }

    public void setCompetitionName(String competitionName) {
        this.competitionName = competitionName;
    }

    public String getPalce() {
        return palce;
    }

    public void setPalce(String palce) {
        this.palce = palce;
    }

    public int getNumber() {
        return number;
    }

    public void setNumber(int number) {
        this.number = number;
    }

    public String getTime() {
        return time;
    }

    public void setTime(String time) {
        this.time = time;
    }

    @Override
    public String toString() {
        return "Competition{" +
                "c_id='" + c_id + '\'' +
                ", competitionName='" + competitionName + '\'' +
                ", palce='" + palce + '\'' +
                ", number=" + number +
                ", time='" + time + '\'' +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Competition that = (Competition) o;
        return number == that.number && Objects.equals(c_id, that.c_id) && Objects.equals(competitionName, that.competitionName) && Objects.equals(palce, that.palce) && Objects.equals(time, that.time);
    }

    @Override
    public int hashCode() {
        return Objects.hash(c_id, competitionName, palce, number, time);
    }
}
